#!/sbin/openrc-run

name="vaultwarden"
description="vaultwarden alternative bitwarden backend"
supervisor="supervise-daemon"
command="/usr/sbin/vaultwarden"
command_user="vaultwarden:vaultwarden"
output_log="/var/log/vaultwarden/access.log"
error_log="/var/log/vaultwarden/error.log"
directory=$DATA_FOLDER

depend() {
	need localmount net
	after firewall
}

start_pre() { 
	checkpath --directory --owner vaultwarden:vaultwarden --mode 0744 \
		/var/lib/vaultwarden /var/log/vaultwarden
}
